const fs = require('fs')
const path = require('path')

let readStream = fs.createReadStream(path.join(__dirname,'test111'),'utf8')

readStream.on('data',(chunk)=>{
    console.log(chunk)
})
readStream.on('end',(chunk)=>{
    console.log(chunk)
})

readStream.on('error',(err)=>{
    console.log(err)
})


let writeStream = fs.createWriteStream(path.join(__dirname,'test111'))

writeStream.on('data',(chunk)=>{

})

writeStream.on('finish',(chunk)=>{
    
})

writeStream.on('error',(err)=>{
    
})